package {{.TableCamelNameLower}}

import (
	"mldong/api/base"

	"github.com/gogf/gf/v2/frame/g"
)

type SaveReq struct {
	g.Meta `path:"/{{.ModuleName}}/{{.TableCamelNameLower}}/save" tags:"{{.Remark}}管理" method:"post" summary:"添加{{.Remark}}"`
	{{.TableCamelName}}Param
}
type UpdateReq struct {
	g.Meta `path:"/{{.ModuleName}}/{{.TableCamelNameLower}}/update" tags:"{{.Remark}}管理" method:"post" summary:"修改{{.Remark}}"`
	{{.TableCamelName}}Param
}
type DetailReq struct {
	g.Meta `path:"/{{.ModuleName}}/{{.TableCamelNameLower}}/detail" tags:"{{.Remark}}管理" method:"post" summary:"{{.Remark}}详情"`
	ID     string `json:"id" dc:"{{.Remark}}ID" v:"required#请输入{{.Remark}}ID"`
}

type DetailRes struct {
	base.CommonResult
	Data {{.TableCamelName}}VO `json:"data" dc:"{{.Remark}}信息"`
}
type RemoveReq struct {
	g.Meta `path:"/{{.ModuleName}}/{{.TableCamelNameLower}}/remove" tags:"{{.Remark}}管理" method:"post" summary:"删除{{.Remark}}"`
	Ids    []string `json:"ids" dc:"{{.Remark}}ID集合" v:"required#请输入{{.Remark}}ID集合|min-length:1"`
}
type PageReq struct {
	g.Meta `path:"/{{.ModuleName}}/{{.TableCamelNameLower}}/page" tags:"{{.Remark}}管理" method:"post" summary:"{{.Remark}}分页查询"`
	base.PageParam
}{{ if .IsTree }}
type ListReq struct {
	g.Meta `path:"/{{.ModuleName}}/{{.TableCamelNameLower}}/list" tags:"{{.Remark}}管理" method:"post" summary:"{{.Remark}}列表"`
	base.PageParam
}
type TreeReq struct {
	g.Meta `path:"/{{.ModuleName}}/{{.TableCamelNameLower}}/tree" tags:"{{.Remark}}管理" method:"post" summary:"{{.Remark}}树"`
	base.PageParam
}{{ end }}
type {{.TableCamelName}}PageVO struct {
	base.PageVO
	Rows []{{.TableCamelName}}VO `json:"rows" dc:"数据列表"`
}
type PageRes struct {
	base.CommonResult
	Data {{.TableCamelName}}PageVO `json:"data" dc:"{{.Remark}}分页返回实体"`
}{{ if .IsTree }}
type ListRes struct {
	base.CommonResult
	Data []{{.TableCamelName}}VO `json:"data" dc:"{{.Remark}}返回列表实体"`
}
type TreeRes struct {
	base.CommonResult
	Data []{{.TableCamelName}}VO `json:"data" dc:"{{.Remark}}返回树实体"`
}{{ end }}